/**
 * Created by LLAP on 2018/1/8.
 * Copyright (c) 2017 LLAP. All rights reserved.
 */
public class Station {
    protected int id;
    protected String name;
    protected String line;

    public Station() {}
    public Station(String name, String line) {
        this.name = name;
        this.line = line;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLine() {
        return line;
    }

    public void setLine(String line) {
        this.line = line;
    }

    public String toString() {
        return "[" + this.id + "] " + this.name + "";
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        Station t = (Station)obj;
        if (t.id == id && t.name.equals(name)) return true;
        return false;
    }

}
